package com.excellent.entity;

import lombok.Data;
import org.json.JSONException;
import org.json.JSONObject;

@Data
public class ChatResponse {
    String requestId;
    String date;
    String answer;

    // 带参数的构造函数，用于从JSONObject创建ChatResponse对象
    public ChatResponse(JSONObject jsonObject) throws JSONException {
        this.requestId = jsonObject.getString("request_id");
        this.date = jsonObject.getString("date");
        this.answer = jsonObject.getString("answer");
    }
}